﻿#ifndef lv_time_date_H
#define lv_time_date_H
#ifdef __cplusplus
extern "C" {
#endif
#include "lvgl/lvgl.h"
#define STR_LEN  8 //字符长度;
#define NUM_PAIRS 4  //分解的组数;
#define PAIR_LEN  2  //每组字符数

//定义一个年月日结构体
typedef struct
{
    uint16_t year;/*存当前值*/
    uint8_t month;/*存当前值*/
    uint8_t day;/*存当前值*/
    uint16_t year_set_value;/*存设置值*/
    uint8_t month_set_value;
    uint8_t day_set_value;
}Date;
//定义一个时分秒的结构体
typedef struct
{
    uint16_t hour;/*存当前值*/
    uint16_t min;/*存当前值*/
    uint16_t sec;/*存当前值*/
    uint16_t hour_set_value;/*存设置值*/
    uint16_t min_set_value; /*存设置值*/
    uint16_t sec_set_value;/*存设置值*/
    uint16_t Am0_Pm1;/*上午下午标志位*/
}Time;
lv_obj_t* realtime1_label; // 时间显示标签
lv_obj_t* date1_label;     // 日期显示标签
lv_obj_t* currentdate_panle;/*日期设置面板*/
lv_obj_t* Date_Time_set_btn;//日期和时间设置按钮
lv_obj_t* btn_yes;
lv_obj_t* btn_no;
lv_obj_t* label_yes;
lv_obj_t* label_no;
lv_obj_t* btn_cancle;
lv_obj_t* textarea_YMD;//年输入框
lv_obj_t* textarea_HMS;//月输入框

lv_obj_t* ui_maincrc;
lv_obj_t* ui_Panel1;
lv_obj_t* ui_textareaHMS;
lv_obj_t* ui_textareaHMS1;
lv_obj_t* ui_Label1;

// CUSTOM VARIABLES
//lv_obj_t* uic_textareaHMS;
//lv_obj_t* uic_textareaHMS;


// SCREEN: ui_Screen1

lv_obj_t* ui_Screen1;
lv_obj_t* ui_Panel5;
lv_obj_t* ui_pannel_Date_set;
lv_obj_t* ui_year_roll;
lv_obj_t* ui_month_roll;
lv_obj_t* ui_day_roll;
lv_obj_t* ui_day30roll;
lv_obj_t* ui_day29roll;
lv_obj_t* ui_day28roll;
lv_obj_t* ui_Label_date_set;
lv_obj_t* ui_Panel_Time_set;
lv_obj_t* ui_Switch24or12;
lv_obj_t* ui_Label_24H;
lv_obj_t* ui_hour_roll;
lv_obj_t* ui_AM_PMroll;
lv_obj_t* ui_min_roll;
lv_obj_t* ui_sec_roll;
lv_obj_t* ui_time_setLabel;

#define _UI_MODIFY_FLAG_ADD 0
#define _UI_MODIFY_FLAG_REMOVE 1
#define _UI_MODIFY_FLAG_TOGGLE 2

void lv_timer(void);


#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_EXAMPLES_H*/
